import { createStore } from 'vuex'
import getters from "./getters";
import mutations from "./mutations";
import actions from "./actions";
import user from "./usermodules/user";
const state = {
  num:20,
      dnum:10,
      cnum:5,
      //购物车
      cartlist:[
    {id:1,name:'商品1',price:30,num:1},
    {id:2,name:'商品2',price:10,num:1},
    {id:3,name:'商品3',price:20,num:1},
    {id:4,name:'商品4',price:40,num:1},
    {id:5,name:'商品5',price:50,num:2}
  ]
}
const article = {};
export default createStore({
  state,
  getters,
  mutations,
  actions,
  modules: {user,article }
})
